# Maintainer: Bruno Pagani <archange@archlinux.org>

_pkg=cligj
pkgname=python-${_pkg}
pkgver=0.7.2
pkgrel=4
pkgdesc="Click-based argument and option decorators for Python GIS command line programs"
arch=(any)
url="https://github.com/mapbox/cligj"
license=(BSD)
depends=(python-click)
makedepends=(python-setuptools)
checkdepends=(python-pytest)
source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz)
sha256sums=('a4bc13d623356b373c2c27c53dbd9c68cae5d526270bfa71f6c6fa69669c6b27')

build() {
  cd ${_pkg}-${pkgver}
  python setup.py build
}

check() {
  cd ${_pkg}-${pkgver}
  PYTHONPATH="${PWD}"/build/lib pytest
}


package() {
  cd ${_pkg}-${pkgver}
  python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1
  install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
}
